package com.gk.bean.qfdto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * 库存调整单返回结果
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class GKT400BackJson implements Serializable {

    @JsonProperty("xml")
    private XmlDTO xml;

    @NoArgsConstructor
    @Data
    public static class XmlDTO {
        @JsonProperty("header")
        private HeaderDTO header;
        @JsonProperty("content")
        private ContentDTO content;

        @NoArgsConstructor
        @Data
        public static class HeaderDTO {
            @JsonProperty("sendSource")
            private String sendSource;
            @JsonProperty("sender")
            private String sender;
            @JsonProperty("jsonMessageType")
            private JsonMessageTypeDTO jsonMessageType;
            @JsonProperty("sendType")
            private String sendType;
            @JsonProperty("businessType")
            private String businessType;
            @JsonProperty("message")
            private String message;
            @JsonProperty("sendTime")
            private String sendTime;
            @JsonProperty("status")
            private Integer status;

            @NoArgsConstructor
            @Data
            public static class JsonMessageTypeDTO {
                @JsonProperty("owner")
                private String owner;
                @JsonProperty("belongno")
                private String belongno;
            }
        }

        @NoArgsConstructor
        @Data
        public static class ContentDTO {
            @JsonProperty("detail")
            private DetailDTO detail;

            @NoArgsConstructor
            @Data
            public static class DetailDTO {
                @JsonProperty("sub")
                private SubDTO sub;
                @JsonProperty("main")
                private MainDTO main;
                @JsonProperty("snnbr")
                private List<?> snnbr;

                @NoArgsConstructor
                @Data
                public static class SubDTO {
                    @JsonProperty("subline")
                    private List<SublineDTO> subline;

                    @NoArgsConstructor
                    @Data
                    public static class SublineDTO {

                        @JsonProperty("tradedtlid")
                        private String tradedtlid;
                        @JsonProperty("fromstorageid")
                        private String fromstorageid;
                        @JsonProperty("goodspackid")
                        private String goodspackid;
                        @JsonProperty("goodsownerid")
                        private String goodsownerid;
                        @JsonProperty("frombatchno")
                        private String frombatchno;
                        @JsonProperty("excol6")
                        private String excol6;
                        @JsonProperty("excol5")
                        private String excol5;
                        @JsonProperty("fromproddate")
                        private String fromproddate;
                        @JsonProperty("dtllines")
                        private String dtllines;
                        @JsonProperty("formapproveno")
                        private String formapproveno;
                        @JsonProperty("tolotno")
                        private String tolotno;
                        @JsonProperty("toproddate")
                        private String toproddate;
                        @JsonProperty("toquanstatus")
                        private String toquanstatus;
                        @JsonProperty("tostorageid")
                        private String tostorageid;
                        @JsonProperty("fromvaliddate")
                        private String fromvaliddate;
                        @JsonProperty("tovaliddate")
                        private String tovaliddate;
                        @JsonProperty("adjuststatus")
                        private String adjuststatus;
                        @JsonProperty("tradeid")
                        private String tradeid;
                        @JsonProperty("ownergoodsid")
                        private String ownergoodsid;
                        @JsonProperty("owner")
                        private String owner;
                        @JsonProperty("exco14")
                        private String exco14;
                        @JsonProperty("tradegoodsqty")
                        private Integer tradegoodsqty;
                        @JsonProperty("billstatus")
                        private Integer billstatus;
                        @JsonProperty("ownerqrystatus")
                        private String ownerqrystatus;
                        @JsonProperty("fromcompanyid")
                        private String fromcompanyid;
                        @JsonProperty("tradegoodspack")
                        private String tradegoodspack;
                        @JsonProperty("usestatus")
                        private String usestatus;
                        @JsonProperty("togoodstatus")
                        private String togoodstatus;
                        @JsonProperty("operationtype")
                        private String operationtype;
                        @JsonProperty("fromlotno")
                        private String fromlotno;
                        @JsonProperty("fromgoodstatus")
                        private String fromgoodstatus;
                        @JsonProperty("fromquanstatus")
                        private String fromquanstatus;
                        @JsonProperty("toapproveno")
                        private String toapproveno;
                        @JsonProperty("tradedate")
                        private String tradedate;
                        @JsonProperty("qty")
                        private Integer qty;
                        @JsonProperty("gstorageid")
                        private String gstorageid;
                        @JsonProperty("pk")
                        private String pk;
                        @JsonProperty("billno")
                        private String billno;
                        @JsonProperty("tobatchno")
                        private String tobatchno;
                        @JsonProperty("tocompanyid")
                        private String tocompanyid;
                    }
                }

                @NoArgsConstructor
                @Data
                public static class MainDTO {
                }
            }
        }
    }
}
